package com.wisdytech.common.bean;

import com.wisdytech.common.enums.ConfigurationResult;

import java.io.Serializable;

public class StandardConfigResult implements Serializable{

    private static final long serialVersionUID = 6954192223665998551L;

    private String result;

    private NgData ngData;


    private Object okData;

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public NgData getNgData() {
        return ngData;
    }

    public void setNgData(NgData ngData) {
        this.ngData = ngData;
    }

    public Object getOkData() {
        return okData;
    }

    public void setOkData(Object okData) {
        this.okData = okData;
    }

    public StandardConfigResult(String result, Object okData,NgData ngData) {
        this.result = result;
        this.okData = okData;
        this.ngData=ngData;
    }


    public static StandardConfigResult getOkResult(Object okData) {
        return new StandardConfigResult(ConfigurationResult.OK.getCode(),okData,null);
    }
    
    public static StandardConfigResult getErrorResult(String code,String message) {
    	NgData ngData=new NgData(code,message);
    	return new StandardConfigResult(ConfigurationResult.NG.getCode(),null, ngData);
    }

}
